package com.example.yuekao.presenter;

import com.example.mvp.Presenter.BasePresenter;
import com.example.mvp.callback.BaseModelCallBack;
import com.example.yuekao.bean.Bean;
import com.example.yuekao.bean.Demo;
import com.example.yuekao.model.MianModel;
import com.example.yuekao.view.MianView;

import java.util.List;

public class MainPresenter extends BasePresenter<MianView, MianModel> implements BaseModelCallBack<List<Demo.ListBean>,List<Bean.ListBean>> {

    public  void getData(){
        getModel().getData(this,getLifecycleProvider());
        getModel().getDatabean(this,getLifecycleProvider());
    }

    @Override
    public void onsucess(List<Demo.ListBean> datasBeans) {
        getmView().showList(datasBeans);

    }

    @Override
    public void onerror(String message, int code) {
        getmView().showError(message,code);


    }

    @Override
    public void onsuccess1(List<Bean.ListBean> beans) {
        getmView().onsuccessbean(beans);
    }



}

